<%@page import="com.edu.zx.Service"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

  </head>
  
  <body>
  <jsp:useBean id="user" class="com.edu.zx.User" scope="request"></jsp:useBean>
  <jsp:setProperty property="*" name="user"/>
    <%
    	Service service = new Service();
    	boolean find = service.checkLogin(user.getUsername(), user.getPassword());
   		if(find){
    %>
    
    <jsp:forward page="success.jsp"></jsp:forward>
    <%
   		}else{
    %>
    <jsp:forward page="error.jsp"></jsp:forward>
    <%
   		}
    %>
  </body>
</html>
